<template>
    <div class="top">
      <div class="left"><i class="icon-back" @click="toback()"></i></div>
      <div class="right">
        <div class="song">{{ currentsong.name }}</div>
        <div class="singer">{{ currentsong.singer }}</div>
      </div>
    </div>
</template>

<script>
// import { useRouter } from 'vue-router'
import { useStore } from 'vuex'
export default {
  name: 'Songdetailtop',
  props: {
    currentsong: Object
  },
  setup () {
    const store = useStore()
    const toback = () => {
      store.commit('changefullscreen', false)
    }
    return { toback }
  }
}
</script>

<style scoped lang="scss">
.top {
  position: absolute;
  top: 0;
  width: 100%;
  & > .left {
    position: absolute;
    transform: rotate(-90deg);
    font-size: 22px;
    padding: 9px;
    color: #ffcd32;
  }
  & > .right {
    width: 100%;
    & > .song {
      height: 40px;
      line-height: 40px;
      color: white;
      font-size: 18px;
      width: 70%;
      margin: 0 auto;
      text-align: center;
    }
    & > .singer {
      width: 100%;
      font-size: 14px;
      text-align: center;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
}
</style>
